<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDesignResultTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('design_result', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('g_id')->default(0)->comment('商品id');
            $table->integer('front_mid')->default(0)->comment('正面素材id');
            $table->integer('front_img_id')->default(0)->comment('正面素材图片id');
            $table->integer('back_mid')->default(0)->comment('背面素材id');
            $table->integer('back_img_id')->default(0)->comment('背面素材图片id');
            $table->string('color')->nullable()->comment('颜色');
            $table->decimal('price')->default(0)->comment('价格');
            $table->string('key')->nullable()->comment('加密');
            $table->timestamps();
            $table->softDeletes();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
